import request from '@/config/request.js';

// 数据总览
export const getPreviewList = (params) => request.get('/admin/api/v1/mobile/data/preview', params)
// 获取登录人信息
export const getUserInfoList = () => request.get('/admin/api/v1/ucs-users/info')
// 跟进状态
export const getCountFollowStatus = (params) => request.get('/admin/api/v1/mobile/data/countFollowStatus', params)
// 星际统计
export const getCountStar = (params) => request.get('/admin/api/v1/mobile/data/countStar', params)
// 排名
export const getRankingList = (params) => request.get('/admin/api/v1/mobile/data/rankingList', params)
// 添加客户
export const postCustomers = (data) => request.post('/admin/api/v1/customers', data)
// 查询我的客户列表
export const getCustomersList = (params) => request.get('/admin/api/v1/customers/page/my', params)
// 获取公告内容
export const getNoticeContent = (params) => request.get('/admin/api/v1/crm-notice-settings', params)
// 获取实时数据列表
export const getUserMessage = (params) => request.get('/admin/api/v1/ucs-users/getUserMessage', params)
// 获取当前登录人的信息
export const getUserInfo = (params) => request.get('/admin/api/v1/ucs-users/info', params)

// 拨打电话
export const currentDial = (data) => request.post('/admin/api/zhizhangyi/call/blacklist/current_dial', data)

// 获取当前设备信息
export const currentQuery = (params) => request.get('/admin/api/zzy/facilityData/currentQuery', params)
// 添加微信好友
export const addFriend = (data) => request.post('/admin/api/zhizhangyi/wx/current/addFriend', data)
// 放入公海
export const movetoPublicPool = (data) => request.post('/admin/api/v1/customers/movetoPublicPool', data)
// 放入重要客户
export const movetoImportant = (data) => request.post('/admin/api/v1/customers/movetoImportant', data)
// 放入字典
export const dictionaries = (params) => request.get('/admin/api/v1/crm-dictionaries', params)
// 获取详情
export const getCustomers = (params) => request.get('/admin/api/v1/customers/' + params)
// 跟进记录
export const putCustomers = (data) => request.put('/admin/api/v1/customers', data)
// 回款方式
export const getCollectionMethod = (params) => request.get('/admin/api/v1/crm-dictionaries/collectionMethod', params)
// 新增回款
export const postPayment = (data) => request.post('/admin/api/v1/crm-collection-details', data)

// 公海列表
export const getImportantList = (params) => request.get('/admin/api/v1/customers/page/important', params)
// 在途客户列表
export const getPassageList = (params) => request.get('/admin/api/v1/customers/page/passage', params)
// 再分配客户列表
export const getTodoList = (params) => request.get('/admin/api/v1/customers/page/todo', params)
// 团队客户列表
export const getAllList = (params) => request.get('/admin/api/v1/customers/page/all', params)
// 回流列表
export const getBackflowList = (data) => request.post('/admin/api/v1/customers/page/backflow', data)
// 客户领取列表
export const postDistribute = (data) => request.post('/admin/api/v1/customers/distribute/' + data.userId, data.customerIds)
// 查看待办列表
export const getListForUserList = (params) => request.get('/admin/api/v1/todo-schedule/listForUser', params)
// 客户领取列表
export const postTodoSchedule = (data) => request.post('/admin/api/v1/todo-schedule', data)
// 客户领取列表
export const putTodoSchedule = (data) => request.put('/admin/api/v1/todo-schedule', data)
// 客户领取列表
export const delTodoSchedule = (data) => request.delete('/admin/api/v1/todo-schedule/' + data)
// 查看待办列表
export const getlistForMonth = (params) => request.get('/admin/api/v1/todo-schedule/listForMonth', params)
// 公海列表
export const getPublicList = (params) => request.get('/admin/api/v1/customers/page/public', params)
// 上门客户
export const getPagsForMobileList = (params) => request.get('/admin/api/v1/registrantion/pageForMobile', params)
// 关闭消息
export const readUserMessage = (params) => request.get('/admin/api/v1/ucs-users/readUserMessage', params)
// 关闭消息
export const getPaymentList = (params) => request.get('/admin/api/v1/crm-collection-details/page', params)
// 关闭消息
export const verification = (params) => request.get('/admin/api/v1/loan/verification', params)
// 获取验证码
export const getCode = (data) => request.post('/admin/api/v1/loan/login', data)
// 登录
export const postVerifyCode = (data) => request.post('/admin/api/v1/loan/verifyCode', data)
// 表单保存
export const postSaveInfo = (data) => request.post('/admin/api/v1/house_loan/saveInfo', data)

export const distribute = (params) => {
	const { userId, customerIds } = params
	return request.post(`/admin/api/v1/customers/distribute/${userId}`, customerIds)
}